\hypertarget{plc__main__logic__interface_8h}{}\doxysection{E\+:/\+Robot\+Program/\+Robot\+P\+L\+C/\+Plc\+Main\+Logic/plc\+\_\+main\+\_\+logic\+\_\+interface.h 文件参考}
\label{plc__main__logic__interface_8h}\index{E:/RobotProgram/RobotPLC/PlcMainLogic/plc\_main\_logic\_interface.h@{E:/RobotProgram/RobotPLC/PlcMainLogic/plc\_main\_logic\_interface.h}}


系统\+P\+L\+C逻辑  


{\ttfamily \#include \char`\"{}plc\+\_\+struct\+\_\+define.\+h\char`\"{}}\newline
\doxysubsection*{宏定义}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{plc__main__logic__interface_8h_a8effe85338ce65027768379813f2d282}\label{plc__main__logic__interface_8h_a8effe85338ce65027768379813f2d282}} 
\#define {\bfseries Plc\+Main\+Logic\+Api}~extern \char`\"{}C\char`\"{} \+\_\+\+\_\+declspec(dllimport)
\end{DoxyCompactItemize}
\doxysubsection*{函数}
\begin{DoxyCompactItemize}
\item 
Plc\+Main\+Logic\+Api int \mbox{\hyperlink{plc__main__logic__interface_8h_a2508c226e9efd400ce9b28e9a3bf0d9b}{C\+Plc\+Control\+::\+Plc\+Main\+Logic}} ()
\begin{DoxyCompactList}\small\item\em 系统\+P\+L\+C主逻辑循环执行接口 \end{DoxyCompactList}\item 
Plc\+Main\+Logic\+Api void \mbox{\hyperlink{plc__main__logic__interface_8h_a8e4f486a474c32ab3ebe07d64985c276}{C\+Plc\+Control\+::delete\+Instance}} ()
\begin{DoxyCompactList}\small\item\em 删除系统\+P\+L\+C接口 \end{DoxyCompactList}\item 
Plc\+Main\+Logic\+Api void \mbox{\hyperlink{plc__main__logic__interface_8h_af4003198c0e2f50c665c6edfa7a0228e}{C\+Plc\+Control\+::init\+IO}} ()
\begin{DoxyCompactList}\small\item\em 反同步\+D\+O到\+Y变量 \end{DoxyCompactList}\item 
Plc\+Main\+Logic\+Api void \mbox{\hyperlink{plc__main__logic__interface_8h_a8b4284aedf859489e4ca0e08ae763d61}{C\+Plc\+Control\+::add\+Command\+List}} (Command\+Detail $\ast$cmd)
\begin{DoxyCompactList}\small\item\em 添加外部命令进入\+P\+L\+C线程指令流，执行\+I\+O、系统级操作 \end{DoxyCompactList}\item 
\mbox{\Hypertarget{plc__main__logic__interface_8h_a7379a25c557a5da10c9e106579593d37}\label{plc__main__logic__interface_8h_a7379a25c557a5da10c9e106579593d37}} 
Plc\+Main\+Logic\+Api int {\bfseries C\+Plc\+Control\+::get\+Robot\+Teach\+Mode} (int group=0)
\item 
\mbox{\Hypertarget{plc__main__logic__interface_8h_a493983d19185f79916d94493cc9a8760}\label{plc__main__logic__interface_8h_a493983d19185f79916d94493cc9a8760}} 
Plc\+Main\+Logic\+Api int {\bfseries C\+Plc\+Control\+::get\+Robot\+Teach\+Nc\+Status} (int group=0)
\item 
\mbox{\Hypertarget{plc__main__logic__interface_8h_aa40a6a9018e973fe32ed4a12fce24829}\label{plc__main__logic__interface_8h_aa40a6a9018e973fe32ed4a12fce24829}} 
Plc\+Main\+Logic\+Api int {\bfseries C\+Plc\+Control\+::get\+Robot\+Replay\+Nc\+Status} (int group=0)
\item 
\mbox{\Hypertarget{plc__main__logic__interface_8h_aa5fca178ea87941064fcad1b0ba75025}\label{plc__main__logic__interface_8h_aa5fca178ea87941064fcad1b0ba75025}} 
Plc\+Main\+Logic\+Api bool {\bfseries C\+Plc\+Control\+::get\+Robot\+Servo\+Status} (int group=0)
\item 
Plc\+Main\+Logic\+Api bool \mbox{\hyperlink{plc__main__logic__interface_8h_a6ad1a609832fe5d4120c3fc29045e28c}{C\+Plc\+Control\+::get\+Robot\+Alarm\+Status}} ()
\begin{DoxyCompactList}\small\item\em 获取机器人报警状态 \end{DoxyCompactList}\item 
Plc\+Main\+Logic\+Api bool \mbox{\hyperlink{plc__main__logic__interface_8h_a96ee28b6f94725e5ab7e54d64c61ce46}{C\+Plc\+Control\+::get\+Robot\+Hmi\+Estop}} ()
\begin{DoxyCompactList}\small\item\em 获取机器人试教急停状态 \end{DoxyCompactList}\item 
Plc\+Main\+Logic\+Api bool \mbox{\hyperlink{plc__main__logic__interface_8h_a97671df3e3341c1f933348de07cb83b9}{C\+Plc\+Control\+::get\+Robot\+External\+Estop}} ()
\begin{DoxyCompactList}\small\item\em 获取机器人外部急停状态 \end{DoxyCompactList}\item 
Plc\+Main\+Logic\+Api bool \mbox{\hyperlink{plc__main__logic__interface_8h_a592e8650e26322cbe6f134fd71f48d58}{C\+Plc\+Control\+::get\+Robot\+Estop}} ()
\begin{DoxyCompactList}\small\item\em 获取机器人急停状态 \end{DoxyCompactList}\item 
Plc\+Main\+Logic\+Api bool \mbox{\hyperlink{plc__main__logic__interface_8h_a4aba11e4aa20d49744b1e57988ca3891}{C\+Plc\+Control\+::get\+Robot\+Crash\+Check\+Status}} ()
\begin{DoxyCompactList}\small\item\em 获取机器人碰撞检测状态 \end{DoxyCompactList}\item 
Plc\+Main\+Logic\+Api bool \mbox{\hyperlink{plc__main__logic__interface_8h_a1c95e74faf904bbd475dceabb868ebdc}{C\+Plc\+Control\+::get\+Robot\+Safe\+Door\+Status}} ()
\begin{DoxyCompactList}\small\item\em 获取机器人碰撞检测状态 \end{DoxyCompactList}\item 
Plc\+Main\+Logic\+Api bool \mbox{\hyperlink{plc__main__logic__interface_8h_a2dbd9a8970c094104e386b81cecb909d}{C\+Plc\+Control\+::get\+Robot\+Hmi\+Servo\+Switch}} ()
\begin{DoxyCompactList}\small\item\em 获取机器人示教器三段开关 \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{详细描述}
系统\+P\+L\+C逻辑 

\begin{DoxyAuthor}{作者}
张 \href{mailto:zhang.zb@googoltech.com}{\texttt{ zhang.\+zb@googoltech.\+com}} 
\end{DoxyAuthor}
\begin{DoxyVersion}{版本}
v1.\+0.\+0 
\end{DoxyVersion}
\begin{DoxyDate}{日期}
2020-\/10-\/12 
\end{DoxyDate}


\doxysubsection{函数说明}
\mbox{\Hypertarget{plc__main__logic__interface_8h_a8b4284aedf859489e4ca0e08ae763d61}\label{plc__main__logic__interface_8h_a8b4284aedf859489e4ca0e08ae763d61}} 
\index{plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}!addCommandList@{addCommandList}}
\index{addCommandList@{addCommandList}!plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}}
\doxysubsubsection{\texorpdfstring{addCommandList()}{addCommandList()}}
{\footnotesize\ttfamily Plc\+Main\+Logic\+Api void C\+Plc\+Control\+::add\+Command\+List (\begin{DoxyParamCaption}\item[{Command\+Detail $\ast$}]{cmd }\end{DoxyParamCaption})}



添加外部命令进入\+P\+L\+C线程指令流，执行\+I\+O、系统级操作 


\begin{DoxyParams}{参数}
{\em 指令参数} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}

\end{DoxyReturn}
\mbox{\Hypertarget{plc__main__logic__interface_8h_a8e4f486a474c32ab3ebe07d64985c276}\label{plc__main__logic__interface_8h_a8e4f486a474c32ab3ebe07d64985c276}} 
\index{plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}!deleteInstance@{deleteInstance}}
\index{deleteInstance@{deleteInstance}!plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}}
\doxysubsubsection{\texorpdfstring{deleteInstance()}{deleteInstance()}}
{\footnotesize\ttfamily Plc\+Main\+Logic\+Api void C\+Plc\+Control\+::delete\+Instance (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



删除系统\+P\+L\+C接口 


\begin{DoxyParams}[1]{参数}
\mbox{\texttt{ in}}  & {\em 无} & \\
\hline
\mbox{\texttt{ out}}  & {\em 无} & \\
\hline
\end{DoxyParams}
\begin{DoxyNote}{注解}
系统软件退出前调用,用于析构系统\+P\+L\+C静态类 ~\newline
 
\end{DoxyNote}
\mbox{\Hypertarget{plc__main__logic__interface_8h_a6ad1a609832fe5d4120c3fc29045e28c}\label{plc__main__logic__interface_8h_a6ad1a609832fe5d4120c3fc29045e28c}} 
\index{plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}!getRobotAlarmStatus@{getRobotAlarmStatus}}
\index{getRobotAlarmStatus@{getRobotAlarmStatus}!plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}}
\doxysubsubsection{\texorpdfstring{getRobotAlarmStatus()}{getRobotAlarmStatus()}}
{\footnotesize\ttfamily Plc\+Main\+Logic\+Api bool C\+Plc\+Control\+::get\+Robot\+Alarm\+Status (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



获取机器人报警状态 


\begin{DoxyParams}{参数}
{\em $<$br$>$} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
0正常、1有报警 
\end{DoxyReturn}
\mbox{\Hypertarget{plc__main__logic__interface_8h_a4aba11e4aa20d49744b1e57988ca3891}\label{plc__main__logic__interface_8h_a4aba11e4aa20d49744b1e57988ca3891}} 
\index{plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}!getRobotCrashCheckStatus@{getRobotCrashCheckStatus}}
\index{getRobotCrashCheckStatus@{getRobotCrashCheckStatus}!plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}}
\doxysubsubsection{\texorpdfstring{getRobotCrashCheckStatus()}{getRobotCrashCheckStatus()}}
{\footnotesize\ttfamily Plc\+Main\+Logic\+Api bool C\+Plc\+Control\+::get\+Robot\+Crash\+Check\+Status (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



获取机器人碰撞检测状态 


\begin{DoxyParams}{参数}
{\em $<$br$>$} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
0异常、1正常 
\end{DoxyReturn}
\mbox{\Hypertarget{plc__main__logic__interface_8h_a592e8650e26322cbe6f134fd71f48d58}\label{plc__main__logic__interface_8h_a592e8650e26322cbe6f134fd71f48d58}} 
\index{plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}!getRobotEstop@{getRobotEstop}}
\index{getRobotEstop@{getRobotEstop}!plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}}
\doxysubsubsection{\texorpdfstring{getRobotEstop()}{getRobotEstop()}}
{\footnotesize\ttfamily Plc\+Main\+Logic\+Api bool C\+Plc\+Control\+::get\+Robot\+Estop (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



获取机器人急停状态 


\begin{DoxyParams}{参数}
{\em $<$br$>$} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
0异常、1正常 
\end{DoxyReturn}
\mbox{\Hypertarget{plc__main__logic__interface_8h_a97671df3e3341c1f933348de07cb83b9}\label{plc__main__logic__interface_8h_a97671df3e3341c1f933348de07cb83b9}} 
\index{plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}!getRobotExternalEstop@{getRobotExternalEstop}}
\index{getRobotExternalEstop@{getRobotExternalEstop}!plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}}
\doxysubsubsection{\texorpdfstring{getRobotExternalEstop()}{getRobotExternalEstop()}}
{\footnotesize\ttfamily Plc\+Main\+Logic\+Api bool C\+Plc\+Control\+::get\+Robot\+External\+Estop (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



获取机器人外部急停状态 


\begin{DoxyParams}{参数}
{\em $<$br$>$} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
0异常、1正常 
\end{DoxyReturn}
\mbox{\Hypertarget{plc__main__logic__interface_8h_a96ee28b6f94725e5ab7e54d64c61ce46}\label{plc__main__logic__interface_8h_a96ee28b6f94725e5ab7e54d64c61ce46}} 
\index{plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}!getRobotHmiEstop@{getRobotHmiEstop}}
\index{getRobotHmiEstop@{getRobotHmiEstop}!plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}}
\doxysubsubsection{\texorpdfstring{getRobotHmiEstop()}{getRobotHmiEstop()}}
{\footnotesize\ttfamily Plc\+Main\+Logic\+Api bool C\+Plc\+Control\+::get\+Robot\+Hmi\+Estop (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



获取机器人试教急停状态 


\begin{DoxyParams}{参数}
{\em $<$br$>$} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
0异常、1正常 
\end{DoxyReturn}
\mbox{\Hypertarget{plc__main__logic__interface_8h_a2dbd9a8970c094104e386b81cecb909d}\label{plc__main__logic__interface_8h_a2dbd9a8970c094104e386b81cecb909d}} 
\index{plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}!getRobotHmiServoSwitch@{getRobotHmiServoSwitch}}
\index{getRobotHmiServoSwitch@{getRobotHmiServoSwitch}!plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}}
\doxysubsubsection{\texorpdfstring{getRobotHmiServoSwitch()}{getRobotHmiServoSwitch()}}
{\footnotesize\ttfamily Plc\+Main\+Logic\+Api bool C\+Plc\+Control\+::get\+Robot\+Hmi\+Servo\+Switch (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



获取机器人示教器三段开关 


\begin{DoxyParams}{参数}
{\em $<$br$>$} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
0异常、1正常 
\end{DoxyReturn}
\mbox{\Hypertarget{plc__main__logic__interface_8h_a1c95e74faf904bbd475dceabb868ebdc}\label{plc__main__logic__interface_8h_a1c95e74faf904bbd475dceabb868ebdc}} 
\index{plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}!getRobotSafeDoorStatus@{getRobotSafeDoorStatus}}
\index{getRobotSafeDoorStatus@{getRobotSafeDoorStatus}!plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}}
\doxysubsubsection{\texorpdfstring{getRobotSafeDoorStatus()}{getRobotSafeDoorStatus()}}
{\footnotesize\ttfamily Plc\+Main\+Logic\+Api bool C\+Plc\+Control\+::get\+Robot\+Safe\+Door\+Status (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



获取机器人碰撞检测状态 


\begin{DoxyParams}{参数}
{\em $<$br$>$} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
0异常、1正常 
\end{DoxyReturn}
\mbox{\Hypertarget{plc__main__logic__interface_8h_af4003198c0e2f50c665c6edfa7a0228e}\label{plc__main__logic__interface_8h_af4003198c0e2f50c665c6edfa7a0228e}} 
\index{plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}!initIO@{initIO}}
\index{initIO@{initIO}!plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}}
\doxysubsubsection{\texorpdfstring{initIO()}{initIO()}}
{\footnotesize\ttfamily Plc\+Main\+Logic\+Api void C\+Plc\+Control\+::init\+IO (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



反同步\+D\+O到\+Y变量 


\begin{DoxyParams}{参数}
{\em $<$br$>$} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}

\end{DoxyReturn}
\mbox{\Hypertarget{plc__main__logic__interface_8h_a2508c226e9efd400ce9b28e9a3bf0d9b}\label{plc__main__logic__interface_8h_a2508c226e9efd400ce9b28e9a3bf0d9b}} 
\index{plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}!PlcMainLogic@{PlcMainLogic}}
\index{PlcMainLogic@{PlcMainLogic}!plc\_main\_logic\_interface.h@{plc\_main\_logic\_interface.h}}
\doxysubsubsection{\texorpdfstring{PlcMainLogic()}{PlcMainLogic()}}
{\footnotesize\ttfamily Plc\+Main\+Logic\+Api int C\+Plc\+Control\+::\+Plc\+Main\+Logic (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



系统\+P\+L\+C主逻辑循环执行接口 


\begin{DoxyParams}[1]{参数}
\mbox{\texttt{ in}}  & {\em 无} & \\
\hline
\mbox{\texttt{ out}}  & {\em 无} & \\
\hline
\end{DoxyParams}
\begin{DoxyNote}{注解}
需要周期调用,用于处理系统\+P\+L\+C相关的逻辑操作 
\end{DoxyNote}
\begin{DoxyReturn}{返回}
$<$0$>$\+:正常返回 
\end{DoxyReturn}
